﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataTurnClient.Model
{
    public class DingMsg
    {
        /// <summary>
        /// 消息类型（必填）
        /// </summary>
        [JsonProperty("msgtype")]
        public string MsgType { get; set; }

        /// <summary>
        /// 消息详情（必填）
        /// </summary>
        [JsonProperty("markdown")]
        public DingMsgMarkDown MarkDown { get; set; }

        /// <summary>
        /// @列表（非必填）
        /// </summary>
        [JsonProperty("at")]
        public DingMsgAt At { get; set; }

    }

    public class DingMsgMarkDown
    {
        /// <summary>
        /// 标题（必填）
        /// </summary>
        [JsonProperty("title")]
        public string Title { get; set; }

        /// <summary>
        /// 内容（必填）
        /// </summary>
        [JsonProperty("text")]
        public string Text { get; set; }
    }

    public class DingMsgAt
    {
        [JsonProperty("atMobiles")]
        public List<string> AtMobiles { get; set; }

        [JsonProperty("atUserIds")]
        public List<string> AtUserIds { get; set; }

        [JsonProperty("isAtAll")]
        public bool IsAtAll { get; set; }
    }
}
